/* 
 * AUTHOR: Kevin Lam
 */

package com.apps.ubc.cc;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.apps.datastore.NotifierDatastore;
import com.apps.datastore.dao.ContactInformationObject;
import com.apps.datastore.dao.UniqueCourseObject;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.EntityNotFoundException;
import com.google.appengine.api.taskqueue.Queue;
import com.google.appengine.api.taskqueue.QueueFactory;
import com.google.appengine.api.taskqueue.TaskOptions;

public class UpdateCacheQueueServlet extends HttpServlet {
	
	private static final Logger log = Logger.getLogger(UpdateCacheQueueServlet.class.getName());
	private static Queue q = QueueFactory.getDefaultQueue();

	public void doGet(HttpServletRequest req, HttpServletResponse resp){
		q.add(TaskOptions.Builder.withUrl("/updatecache"));
		log.info("Added servlet task \"/updatecache\" to queue");
	}

}
